package chapter11

import scala.collection.mutable.ArrayBuffer

/**
  * @Copyright: Shanghai Definesys Company.All rights reserved.
  * @Description:
  * @author: chuhaitao
  * @since: 2019/1/13 13:56
  * @history:
  *          1.2019/1/13 created by chuhaitao
  */
object CollectionDemo {

  def main(args: Array[String]): Unit = {
    var arr01 = new Array[Any](10)

    var arr02 = Array(1, "qw")
    for (item <- arr01) {
      println(item)
    }

    for (i <- 0 until arr02.length) {
      println("--" + i + "value:" + arr02(i))

    }

  //可变数组的定义
    var arr03 = new ArrayBuffer[String]()

    arr03.append("2", "3")
    println("arr03"+arr03(1))

    arr03.remove(1)
  }


}
